Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DeadCode] Skip used in compact() on RemoveUnusedConstructorParamRector #2345

Merged
merged 5 commits into from
May 22, 2022

Conversation

samsonasik
Copy link
Member

The following code should be skipped:

final class SkipUsedInCompact
{
    public $data;

    public function __construct($hey, $man)
    {
        $this->data = compact('hey', 'man');
    }
}

ref https://3v4l.org/DMSih

@samsonasik
Copy link
Member Author

Fixed 🎉 , also moved duplicated functionality from ClassMethodManipulator to ParamAnalyzer for param used in classmethod check.

@samsonasik samsonasik force-pushed the skip-used-in-compact branch from 988b750 to 93bca34 Compare May 22, 2022 10:04
@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit 68906c7 into main May 22, 2022
@TomasVotruba TomasVotruba deleted the skip-used-in-compact branch May 22, 2022 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants